package com.steven.ourcontest.collect.api

import com.steven.ourcontest.collect.bean.TeamCollectionsRes
import com.steven.ourcontest.contest.bean.MatchCollectionRes
import com.steven.ourcontest.net.BaseResponse
import com.steven.ourcontest.net.EmptyResponse
import io.reactivex.Observable
import retrofit2.http.*

interface CollectApiService {

    @FormUrlEncoded
    @POST("/team/queryCollections")
    fun queryTeamCollections(@Field("lastCreateTime") lastCreateTime: Long): Observable<BaseResponse<TeamCollectionsRes>>

    @FormUrlEncoded
    @POST("/team/addCollection")
    fun addTeamCollection(@Field("teamId") teamId: Long): Observable<BaseResponse<EmptyResponse>>

    @POST("/team/deleteCollection")
    fun deleteTeamCollection(@Field("teamId") teamId: Long): Observable<BaseResponse<EmptyResponse>>

    @FormUrlEncoded
    @POST("/match/collection/add")
    fun addMatchCollection(@Field("matchId") matchId: Long): Observable<BaseResponse<EmptyResponse>>

    @FormUrlEncoded
    @POST("/match/collection/delete")
    fun deleteMatchCollection(@Field("matchId") matchId: Long): Observable<BaseResponse<EmptyResponse>>

    @FormUrlEncoded
    @POST("/match/collection/query")
    fun selectMatchCollections(@Field("lastCreateTime") lastCreateTime: Long): Observable<BaseResponse<MatchCollectionRes>>
}